/**
 * @file: ioctl.h
 * @brief: ioctl层的头文件，包含调度顶层和底层的函数和数据结构
 * @author: liaowx
 * @date: 2019.07.30
 */
#ifndef __IOCTL_H
#define __IOCTL_H

#define FALSE (-1)
#define BUCKET (0)
#define BUBBLE (1)

#define SORT_NUM (2)

#define DEV_CTL (1)
#define GET_DEV_CTL (2)

struct core {
    int cmd;
    int arg;
    int (*dev_ctl)(const int src_size);
    struct core *(*ioctl)(int cmd, struct core *sort_core);
};

extern struct data *init(void);
extern struct core *sort_ioctl(int cmd, struct core *sort_core);
extern int match(struct core *app_core, struct core *sort_core);

#endif